package com.yoyo.ad.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.yoyo.ad.bean.AdConfigListBean;
import com.yoyo.ad.bean.AdInterceptBean;
import com.yoyo.ad.bean.AdLocalConfig;
import com.yoyo.ad.bean.AdSourceConfigListBean;
import com.yoyo.ad.bean.AdStatisticsBean;

import com.yoyo.ad.gen.AdConfigListBeanDao;
import com.yoyo.ad.gen.AdInterceptBeanDao;
import com.yoyo.ad.gen.AdLocalConfigDao;
import com.yoyo.ad.gen.AdSourceConfigListBeanDao;
import com.yoyo.ad.gen.AdStatisticsBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig adConfigListBeanDaoConfig;
    private final DaoConfig adInterceptBeanDaoConfig;
    private final DaoConfig adLocalConfigDaoConfig;
    private final DaoConfig adSourceConfigListBeanDaoConfig;
    private final DaoConfig adStatisticsBeanDaoConfig;

    private final AdConfigListBeanDao adConfigListBeanDao;
    private final AdInterceptBeanDao adInterceptBeanDao;
    private final AdLocalConfigDao adLocalConfigDao;
    private final AdSourceConfigListBeanDao adSourceConfigListBeanDao;
    private final AdStatisticsBeanDao adStatisticsBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        adConfigListBeanDaoConfig = daoConfigMap.get(AdConfigListBeanDao.class).clone();
        adConfigListBeanDaoConfig.initIdentityScope(type);

        adInterceptBeanDaoConfig = daoConfigMap.get(AdInterceptBeanDao.class).clone();
        adInterceptBeanDaoConfig.initIdentityScope(type);

        adLocalConfigDaoConfig = daoConfigMap.get(AdLocalConfigDao.class).clone();
        adLocalConfigDaoConfig.initIdentityScope(type);

        adSourceConfigListBeanDaoConfig = daoConfigMap.get(AdSourceConfigListBeanDao.class).clone();
        adSourceConfigListBeanDaoConfig.initIdentityScope(type);

        adStatisticsBeanDaoConfig = daoConfigMap.get(AdStatisticsBeanDao.class).clone();
        adStatisticsBeanDaoConfig.initIdentityScope(type);

        adConfigListBeanDao = new AdConfigListBeanDao(adConfigListBeanDaoConfig, this);
        adInterceptBeanDao = new AdInterceptBeanDao(adInterceptBeanDaoConfig, this);
        adLocalConfigDao = new AdLocalConfigDao(adLocalConfigDaoConfig, this);
        adSourceConfigListBeanDao = new AdSourceConfigListBeanDao(adSourceConfigListBeanDaoConfig, this);
        adStatisticsBeanDao = new AdStatisticsBeanDao(adStatisticsBeanDaoConfig, this);

        registerDao(AdConfigListBean.class, adConfigListBeanDao);
        registerDao(AdInterceptBean.class, adInterceptBeanDao);
        registerDao(AdLocalConfig.class, adLocalConfigDao);
        registerDao(AdSourceConfigListBean.class, adSourceConfigListBeanDao);
        registerDao(AdStatisticsBean.class, adStatisticsBeanDao);
    }
    
    public void clear() {
        adConfigListBeanDaoConfig.clearIdentityScope();
        adInterceptBeanDaoConfig.clearIdentityScope();
        adLocalConfigDaoConfig.clearIdentityScope();
        adSourceConfigListBeanDaoConfig.clearIdentityScope();
        adStatisticsBeanDaoConfig.clearIdentityScope();
    }

    public AdConfigListBeanDao getAdConfigListBeanDao() {
        return adConfigListBeanDao;
    }

    public AdInterceptBeanDao getAdInterceptBeanDao() {
        return adInterceptBeanDao;
    }

    public AdLocalConfigDao getAdLocalConfigDao() {
        return adLocalConfigDao;
    }

    public AdSourceConfigListBeanDao getAdSourceConfigListBeanDao() {
        return adSourceConfigListBeanDao;
    }

    public AdStatisticsBeanDao getAdStatisticsBeanDao() {
        return adStatisticsBeanDao;
    }

}
